const state = {
  animationPlayRotale: 0, //记录当前旋转的角度
  homeBottomPadding: false, //首页的底部padding值

  Is_Audio_Ended: false, //判断歌曲是否结束 true 默认动
  SpectrumBool:true //设置音频可视化显示
};

const mutations = {
  SET_ANIMATION_ROTALE: (state, value) => {
    state.animationPlayRotale = value;
  },

  SET_HOMEBP: (state, value) => {
    state.homeBottomPadding = value;
  },

  SET_Is_Audio_Ended: (state, bool) => {
    state.Is_Audio_Ended = bool;
  },
  SET_SpectrumBool:(state, bool) => {
    state.SpectrumBool = bool;
  },
};

const actions = {
  Set_UserLike({ commit }, data) {
    return new Promise((resolve, reject) => {
      getUserLike({ id: data.uid, like: data.like })
        .then((res) => {
          // console.log("getUserLike", res);
         
          resolve(res);
        })
        .catch((err) => {
          reject(err);
        });
    });
  },
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
